//C06:cmpfit.c -- compare between float numbers.
#include <math.h>
#include <stdio.h>
int main(void)
{
    const double ANWSER = 3.14159;
    double response;
    printf("What is the value of pi?\n");
    scanf("%lf", &response);
    while(fabs(response - ANWSER) > 0.0001)
    {
        printf("Try again!\n");
        scanf("%lf", &response);
    }
    printf("Close enough!\n");
}
